home *** CD-ROM | disk | FTP | other *** search
- Path: hellwig.a2i!hellwig
- From: Oliver Hellwig <hellwig@rahul.net>
- Newsgroups: comp.lang.c++,comp.lang.c,comp.os.ms-windows.programmer.misc
- Subject: Re: fastest code
- Date: 9 Apr 1996 17:15:18 GMT
- Organization: a2i network
- Message-ID: <4ke5v6$17k@samba.rahul.net>
- References: <316112A2.7D37@public.sta.net.cn> <4k1sntINNdd6@keats.ugrad.cs.ubc.ca> <3165a356.105975604@204.248.25.97> <4k4ll5$fq@solutions.solon.com>
- NNTP-Posting-Host: waltz.rahul.net
- NNTP-Posting-User: hellwig
-
- In article <4k4ll5$fq@solutions.solon.com>,
- Peter Seebach <seebs@solon.com> wrote:
- >In article <3165a356.105975604@204.248.25.97>,
- >William E. Kempf <srwillrd@novia.net> wrote:
- >>A good environ makes a huge difference to a programmer during
- >>development (though every developer has a different opinion about what
- >>a "good" environment is). For this reason, many developers actually
- >>have two compilers, one for development and one for final builds.
- >
- >I would *never* do that. It would be suicide; why run the risk that
- >your "real" build will have bugs your normal build won't, because the
- >compilers have different bugs...
- >
- >YMMV. I use several different compilers for anything I want to develop
- >for real, especially
- > gcc -pedantic -O -Wall -Wshadow -Wstrict-prototypes
- > -Wmissing-prototypes
- >(the -O will enable certain warnings that aren't otherwise possible.)
- > lcc -A -A
- >and occasionally other compilers. lcc is brilliant; it catches things
- >like the subtle portability bug of
- > puts("`foo'");
- >
- I know what you mean! Just a few days ago I used Watcom 10.5 to
- compile the Linux NE2000 driver and I had to track down a bug
- were the watcom compiler optimized away some critical code.
- The code in question looked like this:
-
- for (i=0; i<16; i++)
- prom[i] = prom[i+i];
-
- The output of the compiler left the loop but removed the
- assignment! Disabling optimizations will make it compile
- correctly as will using pointers. However, this
- bug greatly dampened my enthusiasm for Watcom C.
-
-
- --
- Oliver Hellwig
- hellwig@rahul.net
-